//
//  GDTrainInformationModel.m
//  GraduationDesign
//
//  Created by JiaKang.Zhong on 16/1/7.
//  Copyright © 2016年 JiaKang.Zhong. All rights reserved.
//

#import "GDTrainInformationModel.h"
#import "GDJudgeEnterIsNumberOperation.h"

@interface GDTrainInformationModel ()

@property(nonatomic,strong) NSDictionary * dicNum;

@end

@implementation GDTrainInformationModel


+(instancetype)trainInformationWithDic:(NSDictionary *)dic{
    return [[self alloc] initTrainInformationWithDic:dic];
}


-(instancetype)initTrainInformationWithDic:(NSDictionary *)dic{
    if (self = [super init]) {
        _train_no = dic[@"train_no"];
        _train_class_name = dic[@"train_class_name"];
        _start_time = dic[@"start_time"];
        _arrive_time = dic[@"arrive_time"];
        _start_station_name = dic[@"start_station_name"];
        _end_station_name = dic[@"end_station_name"];
        
        _swz_num = dic[@"swz_num"];
        _tz_num  = dic[@"tz_num"];
        _ze_num  = dic[@"ze_num"];
        _zy_num  = dic[@"zy_num"];
        _wz_num  = dic[@"wz_num"];
        _gr_num  = dic[@"gr_num"];
        _rw_num  = dic[@"rw_num"];
        _rz_num  = dic[@"rz_num"];
        _qt_num  = dic[@"qt_num"];
        _yw_num  = dic[@"yw_num"];
        _yz_num  = dic[@"yz_num"];
        
        self.dicNum = @{@"swz":_swz_num,@"tz":_tz_num,@"ze":_ze_num,@"zy":_zy_num,@"wz":_wz_num,@"gr":_gr_num,
                        @"rw":_rw_num,@"rz":_rz_num,@"qt":_qt_num,@"yw":_yw_num,@"yz":_yz_num};
        self.existTicketArray = [GDJudgeEnterIsNumberOperation judgeWithEnterIsNumber:self.dicNum];
        
    }
    return self;
}

@end
